package com.pty.demo.behaviour.strategy;

/**
 * @author pengty
 * @date 2020/3/13
 */
public class CookingStyleContext {

    private CookingCarpStrategy cookingCarpStrategy;

    public CookingCarpStrategy getCookingCarpStrategy() {
        return cookingCarpStrategy;
    }

    public void setCookingCarpStrategy(CookingCarpStrategy cookingCarpStrategy) {
        this.cookingCarpStrategy = cookingCarpStrategy;
    }

    public void cooking() {
        System.out.println("从策略模式的环境中调用方法");
        cookingCarpStrategy.cooking();
    }
}
